package com.example.demo.runner.code;

import com.example.demo.entity.User;

public class RunnerFactory {
    public static CodeRunnerInterface create(String sourceType, User user) throws Exception {
        switch (sourceType) {
            case "C":
                return new CRunner(user);
            default:
                throw new Exception("unsupported source type: " + sourceType);
        }
    }
}
